import  { Dayjs } from "dayjs";
import { selectOutPut } from "../public/selectModel";

//节点模型
export interface nodeExtendModel {

    //节点id
    nodeId: string;

    //节点名称
    label: string;

    //审核人id集合
    reviewerIds: string[] | undefined;

    //过期配置
    expireConfig: ExpireDateModel;

    //抄送人员id
    carbonCopyUser: string[];

    //会签方式
    countersignWay: number;

    //会签顺序
    countersignOrder: number;

    //备注
    remark: string;
}

export interface ExpireDateModel {
    /// <summary>
    /// 过期日期
    /// </summary>
    ExpireDate: string;

    /// <summary>
    /// 是否过期提醒
    /// </summary>
    IsExpireRemind: boolean;

    /// <summary>
    /// 提醒内容
    /// </summary>
    RemindContent: string;

    /// <summary>
    /// 即将过期时间
    /// </summary>
    SoonExpireDate: number;

    /// <summary>
    /// 超时动作
    /// </summary>
    ExpireAction: number;
}

//连线模型
export interface edgeModel {

    //id
    edgeId: string;

    //经过条件
    edgeWhere: string;

    //经过字段
    //edgeWhereNameField: LayuiSelectModel[] | undefined;

    //经过名称
    edgeWhereName: string;

    //经过条件等式
    edgeWhereEquation: string;

    //条件值
    edgeWhereValue: string;

    //备注
    remark: string;
}

//流程模型
export interface flowModel {
    //流程id
    FlowId: string;
    //表单id
    FormId: string;
    //流程内容
    FlowContent: string;
    //流程名称
    FlowName: string;
    //流程备注
    Remark: string;
    //流程类型id
    TypeId: number | undefined;
}

//流程节点模型
export interface flowNodeModel {
    //主键
    Id: string;
    //节点id
    NodeId: string;
    //节点名称
    NodeName: string;
    //节点类型
    NodeType: number;
    //审核人id集合
    ReviewerIds: string[] ;
    //抄送人员id
    CarbonCopyUser: string[] | undefined;
    //表单字段权限
    FormFieldAuth: selectOutPut[];
    //是否设置审核期限
    IsSetExamineExpire: boolean;
    //过期日期
    ExpireDate: number;
    //过期类型：1天，2小时
    ExpireType:number;
    //超时动作
    ExpireAction: number;
    //是否过期提醒
    IsExpireRemind: boolean;
    //即将过期时间
    SoonExpireDate: number;
    //提醒内容
    RemindContent: string;
    //会签顺序
    CountersignOrder:number;
    //会签方式
    CountersignWay:number;
}

//流程节点配置
export interface FlowNodeConfig {
    /// <summary>
    /// 主键
    /// </summary>
    Id: String;

    /// <summary>
    /// 流程id
    /// </summary>
    FlowId: String;

    /// <summary>
    /// 表单主键
    /// </summary>
    FormId: String;

    /// <summary>
    /// 流程节点id
    /// </summary>
    FlowNodeId: String;

    //节点类型
    NodeType: number;

    /// <summary>
    /// 过期配置
    /// </summary>
    ExpireConfig: String;

    /// <summary>
    /// 是否过期提醒
    /// </summary>
    IsExpireRemind: boolean;

    /// <summary>
    /// 字段权限配置
    /// </summary>
    FieldAuthConfig: String;
}

//新增/编辑输入模型
export interface FlowInput {
    flowNodeConfigList: FlowNodeConfig[];
    flow: flowModel;
}